package com.wancaijinfu.parse;

import java.util.ArrayList;
import java.util.List;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import com.wancaijinfu.javabean.AD;

public class ADParse extends PostParse{

	
	@Override
	public Object parseSuccess(JSONObject object) throws JSONException {
		List<AD> data = new ArrayList<AD>();
		
		JSONArray borrowlist = object.getJSONArray("data");
		
		for (int i = 0; i < borrowlist.length(); i++) {
			JSONObject newObj = borrowlist.getJSONObject(i);
			AD item = new AD();
		
			item.image = newObj.getString("imgurl");
			
			data.add(item);
		}
		
		return data;
	}

	
	

}
